static void gtk_css_style_provider_iface_init (GtkStyleProviderIface *iface);
static void gtk_css_style_provider_private_iface_init (GtkStyleProviderPrivateInterface *iface);
static void widget_property_value_list_free (WidgetPropertyValue *head);
+static void gtk_css_style_provider_emit_error (GtkStyleProviderPrivate *provider,
+ GtkCssSection *section,
+ const GError *error);
static gboolean
gtk_css_provider_load_internal (GtkCssProvider *css_provider,
g_slice_free (GtkCssScanner, scanner);
}
+static void
+gtk_css_style_provider_emit_error (GtkStyleProviderPrivate *provider,
+ GtkCssSection *section,
+ const GError *error)
+{
+ g_signal_emit (provider, css_provider_signals[PARSING_ERROR], 0, section, error);
+}
+
static void
gtk_css_provider_emit_error (GtkCssProvider *provider,
GtkCssScanner *scanner,
const GError *error)
{
- g_signal_emit (provider, css_provider_signals[PARSING_ERROR], 0,
- scanner != NULL ? scanner->section : NULL, error);
+ gtk_css_style_provider_emit_error (GTK_STYLE_PROVIDER_PRIVATE (provider),
+ scanner ? scanner->section : NULL,
+ error);
}
static void
{
GtkCssScanner *scanner = user_data;
- gtk_css_provider_emit_error (scanner->provider,
- scanner,
- error);
+ gtk_css_provider_emit_error (scanner->provider, scanner, error);
}
static GtkCssScanner *
iface->get_color = gtk_css_style_provider_get_color;
iface->get_keyframes = gtk_css_style_provider_get_keyframes;
iface->lookup = gtk_css_style_provider_lookup;
+ iface->emit_error = gtk_css_style_provider_emit_error;
}
static void
GtkCssScanner *scanner,
GError *error)
{
- gtk_css_provider_emit_error (provider,
- scanner,
- error);
-
+ gtk_css_provider_emit_error (provider, scanner, error);
g_error_free (error);
}
return iface->get_scale (provider);
}
+
+void
+_gtk_style_provider_private_emit_error (GtkStyleProviderPrivate *provider,
+ GtkCssSection *section,
+ GError *error)
+{
+ GtkStyleProviderPrivateInterface *iface;
+
+ iface = GTK_STYLE_PROVIDER_PRIVATE_GET_INTERFACE (provider);
+
+ if (iface->emit_error)
+ iface->emit_error (provider, section, error);
+}
const GtkCssMatcher *matcher,
GtkCssLookup *lookup,
GtkCssChange *out_change);
-
+ void (* emit_error) (GtkStyleProviderPrivate *provider,
+ GtkCssSection *section,
+ const GError *error);
/* signal */
void (* changed) (GtkStyleProviderPrivate *provider);
};
void _gtk_style_provider_private_changed (GtkStyleProviderPrivate *provider);
+void _gtk_style_provider_private_emit_error (GtkStyleProviderPrivate *provider,
+ GtkCssSection *section,
+ GError *error);
+
G_END_DECLS
#endif /* __GTK_STYLE_PROVIDER_PRIVATE_H__ */